package com.common.entity.system;

import com.common.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;


/**
 * @author johnny
 * @since 2019/10/25
 */
@ApiModel(value = "字典对象")
@Data
@Entity
@Table(name = "system_dictionary")
@EntityListeners(AuditingEntityListener.class)
public class DictionaryEntity extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @Transient
    public static Map<String, String> dictionaryMap = new HashMap<>();


    /**
     * 主键Id
     */
    @ApiModelProperty(value = "字典Id", example = "1")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    /**
     * 名称
     */
    @ApiModelProperty(value = "字典名称", example = "员额检察官")
    @Column(name = "NAME")
    private String name;
    /**
     * 值
     */
    @ApiModelProperty(value = "字典值", example = "1")
    @Column(name = "VALUE")
    private String value;
    /**
     * 类型
     */
    @ApiModelProperty(value = "字典类型", example = "检察官类型")
    @Column(name = "TYPE")
    private String type;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @Column(name = "DESCRIPTION")
    private String description;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序",example = "0")
    @Column(name = "SORT_NUM")
    private Integer sortNum;
}
